﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Xyz.Web.Reservation.BookingService;

namespace Xyz.Web.Reservation.Repositories
{
    public class FlightRepository : BaseRepository
    {
        public List<AirportDTO> GetAirports()
        {
            return BookingServiceClient.GetAirports().ToList();
        }

        public FlightDTO GetFlightStatus(String flightCode, DateTime FlightDate, String FlightAirport, bool IsArrival)
        {
            return BookingServiceClient.GetFlightStatus(flightCode, FlightDate, FlightAirport, IsArrival);
        }

        public FlightDTO GetFlightByFlightId(int flightId)
        {
            return BookingServiceClient.GetFlightByFlightId(flightId);
        }

        public List<FlightDTO> GetFlights(DateTime departureDate, String departureAirport, String arrivalAirport)
        {
            return BookingServiceClient.GetFlightByDepartureInfo(departureDate, departureAirport, arrivalAirport).ToList();
        }
    }
}